package com.graph.test;


import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

@Data
public class NodeRelation {
    //源节点
    private Node a;
    //源节点标签
    private String[] labels_a ;
    //关系
    private Object[] r ;
    //目标节点
    private Node b;
    //目标节点标签
    private String[] labels_b ;

    public List<Node> getNodes(){
        ArrayList<Node> nodes = new ArrayList<>();
        a.setValue(labels_a);
        nodes.add(a);
        b.setValue(labels_b);
        nodes.add(b);
        return nodes;
    }

    @Data
    @EqualsAndHashCode
    public static class Node{
        private String name ;

        private String[] value ;
    }


}
